\(\int \frac {2-3 x+x^2}{4-5 x^2+x^4} \, dx\) [73]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 11 \[ \int \frac {2-3 x+x^2}{4-5 x^2+x^4} \, dx=\log (1+x)-\log (2+x) \]

[Out]

ln(1+x)-ln(2+x)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {1600, 630, 31} \[ \int \frac {2-3 x+x^2}{4-5 x^2+x^4} \, dx=\log (x+1)-\log (x+2) \]

[In]

Int[(2 - 3*x + x^2)/(4 - 5*x^2 + x^4),x]

[Out]

Log[1 + x] - Log[2 + x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 630

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[c/q, Int[1/Simp
[b/2 - q/2 + c*x, x], x], x] - Dist[c/q, Int[1/Simp[b/2 + q/2 + c*x, x], x], x]] /; FreeQ[{a, b, c}, x] && NeQ
[b^2 - 4*a*c, 0] && PosQ[b^2 - 4*a*c] && PerfectSquareQ[b^2 - 4*a*c]

Rule 1600

Int[(u_.)*(Px_)^(p_.)*(Qx_)^(q_.), x_Symbol] :> Int[u*PolynomialQuotient[Px, Qx, x]^p*Qx^(p + q), x] /; FreeQ[
q, x] && PolyQ[Px, x] && PolyQ[Qx, x] && EqQ[PolynomialRemainder[Px, Qx, x], 0] && IntegerQ[p] && LtQ[p*q, 0]

Rubi steps \begin{align*} \text {integral}& = \int \frac {1}{2+3 x+x^2} \, dx \\ & = \int \frac {1}{1+x} \, dx-\int \frac {1}{2+x} \, dx \\ & = \log (1+x)-\log (2+x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00 \[ \int \frac {2-3 x+x^2}{4-5 x^2+x^4} \, dx=\log (1+x)-\log (2+x) \]

[In]

Integrate[(2 - 3*x + x^2)/(4 - 5*x^2 + x^4),x]

[Out]

Log[1 + x] - Log[2 + x]

Maple [A] (verified)

Time = 0.03 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.09

method result size
default \(\ln \left (x +1\right )-\ln \left (x +2\right )\) \(12\)
norman \(\ln \left (x +1\right )-\ln \left (x +2\right )\) \(12\)
risch \(\ln \left (x +1\right )-\ln \left (x +2\right )\) \(12\)
parallelrisch \(\ln \left (x +1\right )-\ln \left (x +2\right )\) \(12\)

[In]

int((x^2-3*x+2)/(x^4-5*x^2+4),x,method=_RETURNVERBOSE)

[Out]

ln(x+1)-ln(x+2)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00 \[ \int \frac {2-3 x+x^2}{4-5 x^2+x^4} \, dx=-\log \left (x + 2\right ) + \log \left (x + 1\right ) \]

[In]

integrate((x^2-3*x+2)/(x^4-5*x^2+4),x, algorithm="fricas")

[Out]

-log(x + 2) + log(x + 1)

Sympy [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.73 \[ \int \frac {2-3 x+x^2}{4-5 x^2+x^4} \, dx=\log {\left (x + 1 \right )} - \log {\left (x + 2 \right )} \]

[In]

integrate((x**2-3*x+2)/(x**4-5*x**2+4),x)

[Out]

log(x + 1) - log(x + 2)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00 \[ \int \frac {2-3 x+x^2}{4-5 x^2+x^4} \, dx=-\log \left (x + 2\right ) + \log \left (x + 1\right ) \]

[In]

integrate((x^2-3*x+2)/(x^4-5*x^2+4),x, algorithm="maxima")

[Out]

-log(x + 2) + log(x + 1)

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.18 \[ \int \frac {2-3 x+x^2}{4-5 x^2+x^4} \, dx=-\log \left ({\left | x + 2 \right |}\right ) + \log \left ({\left | x + 1 \right |}\right ) \]

[In]

integrate((x^2-3*x+2)/(x^4-5*x^2+4),x, algorithm="giac")

[Out]

-log(abs(x + 2)) + log(abs(x + 1))

Mupad [B] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.73 \[ \int \frac {2-3 x+x^2}{4-5 x^2+x^4} \, dx=-2\,\mathrm {atanh}\left (2\,x+3\right ) \]

[In]

int((x^2 - 3*x + 2)/(x^4 - 5*x^2 + 4),x)

[Out]

-2*atanh(2*x + 3)